﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;

namespace eLearning
{
    public partial class StudentRoom : Page
    {
        public StudentRoom()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(StudentRoom_Loaded);
        }

        public class Data
        {
            public string ClassName { get; set; }
            public string BranchName { get; set; }
            public DateTime DateBegin { get; set; }
            public
                bool
                //Label 
                Lession { get; set; }
        }

        void StudentRoom_Loaded(object sender, RoutedEventArgs e)
        {
            List<Data> source = new List<Data>();
            int itemsCount = 10;

            for (int i = 0; i < itemsCount; i++)
            {
                source.Add(new Data()
                {
                    ClassName = "First",
                    BranchName = "Last",
                    DateBegin = DateTime.Now,
                    Lession = true//new Label() {Content = "Lession" + i}
                });
            }

            this.ClassViewer.ItemsSource = source;// "1 2 3 4 5 6 7".Split();
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }
    }
}
